{% extends "base.html" %}

{% block pagetitle %}{{ user.hackerprofile.get_display_name|default:'Anonymous' }}{% endblock %}

{% block pageheader %}{{ user.hackerprofile.get_display_name|default:'Anonymous' }}{% endblock %}

{% block keywords %}{% endblock %}

{% block description %}{% endblock %}

{% block content %}

{% include 'main/elements/please_login.html' %}

<form action="" method="post" class="">{% csrf_token %}
    {{ form.next_url.as_hidden }}
    <div class="non-field-errors">{{ form.non_field_errors }}</div>
    <div class="profile">
	<h3>{{ form.display_name.label }}</h3>
	<div class="input">
	    <div class="error">{{ form.display_name.errors }}</div>
	    <div class="help-block">Name to show instead of your username: {{ user.username }}</div>
	    <div class="display_name">{{ form.display_name }}</div>
	</div>
	
	<h3>{{ form.twitter_name.label }}</h3>
	<div class="input input-prepend">
	    <span class="add-on">@</span>
	    <div class="error">{{ form.twitter_name.errors }}</div>
	    <div id="prependedInput" class="twitter_name">{{ form.twitter_name }}</div>
	</div>
	
	<h3>{{ form.blog_url.label }}</h3>
	<div class="input">
	    <div class="error">{{ form.blog_url.errors }}</div>
	    <div class="blog_url">{{ form.blog_url }}</div>
	</div>
	
	<h3>{{ form.homepage_url.label }}</h3>
	<div class="input">
	    <div class="error">{{ form.homepage_url.errors }}</div>
	    <div class="homepage_url">{{ form.homepage_url }}</div>
	</div>
	
	<div class="form-actions">
	    {% include 'main/elements/please_login.html' %}
	    <button type="submit" name="action" class="btn btn-primary" value="Save">Save</button>
	    <button class="btn"><a href="{{ next_url }}">Cancel</a></button>
	</div>
    </div>
</form>

{% endblock %}

{% block ready %}
	$('#id_display_name').focus();
{% endblock %}
